package com.mall.users.controller;

import com.mall.commons.utils.CommonResult;
import com.mall.model.domain.UmsResourceCategory;
import com.mall.model.domain.UmsRole;
import com.mall.users.service.UmsResourceCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/resourceCategory")
public class UmsResourceCategoryController {

    @Autowired
    private UmsResourceCategoryService umsResourceCategoryService;

    /**
     * 查询所有后台资源分类
     * @return
     */
    @GetMapping("/listAll")
    public CommonResult listAll() {
        List<UmsResourceCategory> list = umsResourceCategoryService.listAll();
        return CommonResult.success(list);
    }
}
